package cn.stylefeng.guns.modular.storage.service;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.modular.storage.entity.StoragePut;
import cn.stylefeng.guns.modular.storage.model.params.StoragePutParam;
import cn.stylefeng.guns.modular.storage.model.params.StoragePutSingleParam;
import cn.stylefeng.guns.modular.storage.model.result.StoragePutResult;
import cn.stylefeng.guns.modular.storage.model.result.StoragePutSingleResult;
import cn.stylefeng.guns.sys.modular.system.entity.User;
import cn.stylefeng.roses.core.reqres.response.ResponseData;

import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 入库单表 服务类
 * </p>
 *
 * @author zhucx
 * @since 2019-07-09
 */
public interface StoragePutService extends IService<StoragePut> {

    /**
     * 新增
     *
     * @author zhucx
     * @Date 2019-07-09
     */
    void add(StoragePutParam param);

    /**
     * 删除
     *
     * @author zhucx
     * @Date 2019-07-09
     */
    void delete(StoragePutParam param);

    /**
     * 更新
     *
     * @author zhucx
     * @Date 2019-07-09
     */
    void update(StoragePutParam param);

    /**
     * 查询单条数据，Specification模式
     *
     * @author zhucx
     * @Date 2019-07-09
     */
    StoragePutResult findBySpec(StoragePutParam param);

    /**
     * 查询列表，Specification模式
     *
     * @author zhucx
     * @Date 2019-07-09
     */
    List<StoragePutResult> findListBySpec(StoragePutParam param);

    /**
     * 查询分页数据，Specification模式
     *
     * @author zhucx
     * @Date 2019-07-09
     */
     LayuiPageInfo findPageBySpec(StoragePutParam param,String condition,Long deptId,Long operateId);

     /**
      * 查询最后一条
      * @return
      */
	StoragePut findByThelastone();

    LayuiPageInfo findPageBySpecANDNUM(StoragePutParam storagePutParam, String condition, Long deptId);

	LayuiPageInfo findPageBySpecStorageList(StoragePutParam storagePutParam, Long deptId);

	/**
	 * 入库确认审核
	 * @param storagePutParam
	 */
	ResponseData confirm(StoragePutParam storagePutParam,User user);

	LayuiPageInfo querylistPageBySpec(StoragePutParam storagePutParam, String condition, Long deptId,Long operateId,String singlePutTime);

    StoragePutResult findSpec(StoragePutParam storagePutParam);

	List<StoragePutResult> findPageBySpecANDNUMNew(StoragePutParam storagePutParam, String condition, Long deptId);

	List<StoragePutResult> findPageBySpecStorageListNew(StoragePutParam storagePutParam, Long deptId,Long operateId);

	List<StoragePutResult> findPageBySpecNew(StoragePutParam param,String condition,Long deptId);

	ResponseData shenhegoods(StoragePutSingleParam storagePutSingleParam, User user);

	ResponseData revokegoods(StoragePutSingleParam storagePutSingleParam, User user);
}
